// 我在这里写的是配置式路由
import { lazy } from 'react';

export default {
  path: '/admin',
  name: 'admin',
  component: lazy(() => import('../../views/Admin')),
  children: [
    {
      path: '/admin/users',
      name: 'admin-users',
      component: lazy(() => import('../../views/Users')),
    },
    {
      path: '/admin/seller',
      name: 'admin-seller',
      component: lazy(() => import('../../views/Seller')),
    },
    {
      path: '/admin/rooter',
      name: 'admin-rooter',
      component: lazy(() => import('../../views/Rooter')),
    },
    {
      path: '/admin/food',
      name: 'admin-food',
      component: lazy(() => import('../../views/Food')),
    },
    {
      path: '/admin/order',
      name: 'admin-order',
      component: lazy(() => import('../../views/Order')),
    },
    {
      path: '/admin/addhouse',
      name: 'admin-addhouse',
      component: lazy(() => import('../../views/Addhouse')),
    },
    {
      path: '/admin/addfood',
      name: 'admin-addfood',
      component: lazy(() => import('../../views/Addfood')),
    },
    {
      path: '/admin/chart',
      name: 'admin-chart',
      component: lazy(() => import('../../views/Chart')),
    },
    {
      path: '/admin/edit',
      name: 'admin-edit',
      component: lazy(() => import('../../views/Edit')),
    },
  ]
}